package com.bluerox.updating;

import java.io.File;
import java.io.FilenameFilter;
import java.util.Iterator;
import java.util.List;

import org.jdom.Document;
import org.jdom.Element;

public class UpdateThread implements Runnable {
	private UpdateSofe us = null;
	
	public UpdateThread(UpdateSofe us) {
		this.us = us;
	}
	boolean flag = true;
	@Override
	public void run() {
		while(flag) {
			us.update();
		}
	}
	
	public static void main(String[] args) {
		Entity e = new Entity();
		e.setTitle("Race");
		e.setVersion("1.0.1");
		e.setBaseUrl("http://localhost:8080/race/race1.0.1/");//BaseUrl的构造方式
		e.setBasePath("/home/lijianbo/test");
		
		Thread t = new Thread(new UpdateThread(new UpdateSofe(e)));
		t.run();
	}
}
